<!--
 * @Author: 张俊辉 zhangjunhui@mangocosmos.com
 * @Date: 2025-04-27 10:28:53
 * @LastEditors: 张俊辉 zhangjunhui@mangocosmos.com
 * @LastEditTime: 2025-04-27 10:29:53
 * @FilePath: \threejs\my-vue-project\src\components\map2.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>22</div>
</template>

<script>
// 引入three.js
import * as THREE from 'three'

export default {
  name: 'Map2',
  props: {
    msg: String
  },
  mounted() {
    // 创建渲染器
    const labelRenderer = new CSS2DRenderer()
    const addRenderer = () => {
      labelRenderer.domElement.style.position = 'absolute'
      labelRenderer.domElement.style.top = '0px'
      labelRenderer.domElement.style.pointerEvents = 'none'
      labelRenderer.setSize(window.innerWidth, window.innerHeight)
      document.getElementById('map').appendChild(labelRenderer.domElement)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
